<template>
  <!-- <div id="nav">
    <router-link to="/">Home</router-link> |
    <router-link to="/watcher">watch</router-link> |
    <router-link to="/about">About</router-link> |
    <router-link to="/provide_inject">pro_inj</router-link> |
    <router-link to="/demo_list">DemoList</router-link> |
    <router-link to="/demo_list_class">DemoListClass</router-link> |
    <router-link to="/first-page">firstPage</router-link>
  </div>-->
  <div id="app">
    <el-container>
      <el-aside width="200px">
        <slider />
      </el-aside>
      <el-main>
         <!-- <transition name="fade">
        <router-view />
         </transition> -->
         <router-view v-slot="{ Component }">
          <transition name="bounce" mode="out-in">
            <component :is="Component" />
          </transition>
        </router-view>
      </el-main>
    </el-container>
  </div>
</template>
<script lang="ts">
import slider from "@/components/slider.vue";
import { defineComponent } from "vue";

//组件引入
export default defineComponent({
  components: {
    slider
  }
});
</script>

<style lang="less">
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}

.fade-enter-active, .fade-leave-active {
  transition: opacity .5s;
}
.fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
  opacity: 0;
}
.slide-fade-enter-active {
  transition: all .3s ease;
}
.slide-fade-leave-active {
  transition: all .8s cubic-bezier(1.0, 0.5, 0.8, 1.0);
}
.slide-fade-enter, .slide-fade-leave-to
/* .slide-fade-leave-active for below version 2.1.8 */ {
  transform: translateX(10px);
  opacity: 0;
}
.bounce-enter-active {
  animation: bounce-in .5s;
}
.bounce-leave-active {
  animation: bounce-in .5s reverse;
}
@keyframes bounce-in {
  0% {
    transform: scale(0);
  }
  50% {
    transform: scale(1.5);
  }
  100% {
    transform: scale(1);
  }
}
</style>
